package com.lyr.thread3;

public class MyThread extends Thread {

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i=1;i<11;++i){
            System.out.println(i+": "+this.getName());

            try {
                // 线程休眠时间
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
